package com.easydata.agent.controller;


import com.easydata.agent.core.TaskPool;
import com.easydata.agent.core.entity.TaskDefinition;
import com.easydata.agent.entity.web.Response;
import com.easydata.agent.exceptions.TaskException;
import com.easydata.agent.service.TaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController()
@RequestMapping("/task")
public class TaskController {
    @Autowired
    TaskPool taskPool;

    @GetMapping("/list")
    Response list(@RequestBody TaskDefinition taskDefinition){
        return Response.ok(taskPool.getAll());
    }
}
